<template>
  <a-card style="margin-top: 16px;">
    <div class="ant-card-head-wrapper">
      <div class="ant-card-head-title">
        <span class="title">精彩瞬间</span>
        <span class="subtitle">数据时间：{{dataDate}}</span>
      </div>
      <div class="ant-card-extra">
        <a-button type="primary" @click="handleType('notes')">查看详情<a-icon type="caret-right" /></a-button>
      </div>
    </div>
    <div class="card-content" style="height: 103px;">
      <a-card :bordered="false">
        <a-row>
          <a-col span="8">
            <a-statistic title="照片数量" :value="notes.picture || 0" style="margin-right: 50px" />
          </a-col>
          <a-col span="8">
            <a-statistic title="视频数量" :value="notes.video || 0" style="margin-right: 50px" />
          </a-col>
          <a-col span="8">
            <a-statistic title="录音数量" :value="notes.recording || 0" style="margin-right: 50px" />
          </a-col>
        </a-row>
      </a-card>
    </div>
  </a-card>
</template>
<script>
import { getAction } from '@/api/manage';

export default {
  name: 'notes',
  data() {
    return {
      url: {
        list: '/health/record/student/count'
      },
      studentId: '',
      dataDate: '',
      nextDate: '',
      pageSize: 5,
      notes: {
        picture: 0,
        video: 0,
        recording: 0
      }
    }
  },
  props:[],
  components: {},
  filters: {},
  
  computed: {},
  
  created() {
    this.dataDate = this.$skCommon.getDate(0)
    this.nextDate = this.$skCommon.getDate(0)
  },
  
  activated() {
  },

  mounted() {
    // this.load();
  },

  methods: {
    load(dataForm) {
      this.dataDate =  dataForm.dataDate
      this.studentId = dataForm.studentId
      this.loadRecord();
    },
    loadRecord() {
      let params = {
        studentId: this.studentId,
        queryDate: this.dataDate,
      }
      getAction(this.url.list, params).then(res => {
        console.log('notes', res.result)
        this.notes = res.result[0]
      }).catch(()=>{
        this.sport.loading = false
      })
    },
    handleType(type){
      this.$emit('detail', type)
    },
  }
}
</script>
<style scoped lang="less">

</style>